<template>
    <div class="layout-content">
        <h1>组件双向绑定Demo</h1>
        <div class="content-box">
            <div class="content-box-left">
                <FormArea v-model="form" />
                <el-button @click="submit">提交</el-button>
            </div>
        </div>

    </div>

</template>

<script>
    import FormArea from "../components/form-area/index.vue"
    export default {
        components: {
            FormArea
        },
        data() {
            return {
                form: {
                    name: "aaa"
                }
            }
        },
        methods: {
            submit() {
                console.log(this.form)
            }
        }
    }
</script>

<style lang="less" scoped>
    .content-box {
        // width: 400px;
        display: flex;
        &-left {
            width: 400px;
        }
        &-right {
            width: 400px;
        }
    }
</style>